package com.wiscamp.ninechapters.panels.application.assemblers;


import com.wiscamp.ninechapters.panels.application.command.CreateOrganizationCommand;
import com.wiscamp.ninechapters.panels.application.command.UpdateOrganizationCommand;
import com.wiscamp.ninechapters.panels.application.vo.OrganizationVO;
import com.wiscamp.ninechapters.panels.domain.entities.Organization;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
        nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface OrganizationAssembler {
    OrganizationAssembler Instance = Mappers.getMapper(OrganizationAssembler.class);

    OrganizationVO toOrganizationVO(Organization entity);

    Organization fromCreateCommand(CreateOrganizationCommand createCommand);

    Organization fromUpdateCommand(UpdateOrganizationCommand updateCommand);

}
